import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex)

export default new Vuex.Store({
  state: {
    isToken: true,
    userInfo: {
      name: '源生态友康',
      roles: ['admin']
    },
    routerList: [
      {
        path: '/',
        name: '/',
        redirect: '/login'
      },
      {
        path: '/login',
        name: 'login',
        component: () => import('../views/login/index')
      },
      {
        path: '/layout',
        name: 'layout',
        component: () => import('../views/layout/index'),
        children: [
          {
            path: '/',
            name: 'home',
            component: () => import('../views/home/index')
          },
          {
            path: '/cuisine',
            name: 'cuisine',
            component: cuisine
          },
          {
            path: '/details',
            name: 'details',
            component: details
          },
          {
            path: '/accounts',
            name: 'accounts',
            component: accounts
          },
          {
            path: '/staff',
            name: 'staff',
            component: staff
          },
          {
            path: '/set',
            name: 'set',
            component: set
          }
        ]
      }
      // {
      //   path: '/Product',
      //   name: '菜品库',
      //   redirect: '/Product/index',
      //   children: [
      //     {
      //       path: '/Product/index',
      //       name: '产品管理',
      //       component: () => import('../views/Product/index')
      //     },
      //     {
      //       path: '/Product/Adm',
      //       name: '产品管理',
      //       component: () => import('../views/Product/Adm')
      //     },
      //     {
      //       path: '/Product/Add',
      //       name: '添加',
      //       component: () => import('../views/Product/Add')
      //     }
      //   ]
      // }
    ]
  },
  mutations: {},
  actions: {},
  modules: {}
})
